package com.lipaluma.examples.annotation.adapters;

import org.joda.time.DateTime;

import com.lipaluma.annotations.adaptors.Adapt;
import com.lipaluma.annotations.adaptors.standard.Trim;
import com.lipaluma.annotations.mapping.MapColumn;
import com.lipaluma.annotations.mapping.NotMapped;
import com.lipaluma.csv.annotations.config.CSV;

@CSV(delimiter=';', trimAll=false)
public class AdaptPojo {

	@Trim
	@MapColumn(index=1)
	private int m1;
	
	@Adapt(trim=true, truncateAt=4)
	@MapColumn(index=2)
	private String m2;

	@Trim
	@MapColumn(index=3)
	private Integer m3;

	@NotMapped
	private DateTime time;

	private InternPojo oc;
	
	public int getM1() {
		return m1;
	}
	public void setM1(int m1) {
		this.m1 = m1;
	}
	public String getM2() {
		return m2;
	}
	public void setM2(String m2) {
		this.m2 = m2;
	}
	public Integer getM3() {
		return m3;
	}
	public void setM3(Integer m3) {
		this.m3 = m3;
	}
	public InternPojo getOc() {
		return oc;
	}
	public void setOc(InternPojo oc) {
		this.oc = oc;
	}
	public DateTime getTime() {
		return time;
	}
	public void setTime(DateTime time) {
		this.time = time;
	}
}
